﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.Search.TxSearchCommand.CApSearchCommandCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.Search.TxSearchCommand.Resources;
using System;
using System.Windows;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui.WPF;


namespace DnProcessSimulateCommands.Search.TxSearchCommand;

public class CApSearchCommandCmd : TxButtonCommand, ITxToolbarCommand
{
  private TxWindow _window;

  public virtual string Category => TxSearchCommandStringTable.Category;

  public virtual string Name => TxSearchCommandStringTable.Name;

  public virtual string Bitmap => "Search.TxSearchCommand.Resources.Search.bmp";

  public virtual string LargeBitmap => "Search.TxSearchCommand.Resources.Search_LARGE.png";

  public virtual string Tooltip => TxSearchCommandStringTable.Tooltip;

  public virtual string Description => TxSearchCommandStringTable.Description;

  public virtual void Execute(object cmdParams)
  {
    if (this._window == null)
    {
      this._window = (TxWindow) new CUiSearchCommandWindow();
      ((Window) this._window).Closed += new EventHandler(this._window_Closed);
    }
    ((Window) this._window).Show();
  }

  private void _window_Closed(object sender, EventArgs e) => this._window = (TxWindow) null;
}
